package com.bx.controller;

import com.bx.pojo.Game;
import com.bx.service.GameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Name GameController
 * @Author BaiXin
 * @Date 2022-10-22 19:31
 */
@RestController
@RequestMapping("/games")
public class GameController {
    @Autowired
    private GameService gameService;

    @PostMapping
    public String add(@RequestBody Game game){
        gameService.add(game);
        System.out.println(game);
        return "添加成功";
    }



}
